package ro.cityprojects.adminloc.entities;

import javax.persistence.*;

/**
 * ConsumptionReport class
 *
 * @author bogdan.solga
 * 
 * Date: 13.06.2013, time: 17:47
 */
@Entity
@javax.persistence.IdClass(ro.cityprojects.adminloc.entities.ConsumptionReportPK.class)
@javax.persistence.Table(name = "CONSUMPTION_REPORT")
public class ConsumptionReport {

    @Id
    @Column(name = "REPORT_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    private Report report;

    @Id
    @Column(name = "CONSUMPTION_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    private Consumption consumption;

    public Report getReport() {
        return report;
    }

    public void setReport(Report report) {
        this.report = report;
    }

    public Consumption getConsumption() {
        return consumption;
    }

    public void setConsumption(Consumption consumption) {
        this.consumption = consumption;
    }
}
